package top.gytf.unifiedcall.example.springmvc.constant;

import lombok.RequiredArgsConstructor;
import top.gytf.unifiedcall.jsr269.exception.GenException;
import top.gytf.unifiedcall.model.code.NamespaceCode;
import top.gytf.unifiedcall.model.code.StatusCode;
import top.gytf.unifiedcall.model.code.SymbolCode;

import static top.gytf.unifiedcall.example.common.constant.ExampleNamespaceCode.SPRING_MVC_EXAMPLE;
import static top.gytf.unifiedcall.model.code.builtin.BuiltinSymbolCode.FAIL_CALLEE;

@GenException
@RequiredArgsConstructor
public enum SpringMvcStatusCode implements StatusCode {
    M001(SPRING_MVC_EXAMPLE, FAIL_CALLEE, "M001", "测试错误001")
    ;

    private final NamespaceCode namespace;
    private final SymbolCode symbol;
    private final String serial;
    private final String message;

    @Override
    public NamespaceCode namespace() {
        return namespace;
    }

    @Override
    public SymbolCode symbol() {
        return symbol;
    }

    @Override
    public String serial() {
        return serial;
    }

    @Override
    public String message() {
        return message;
    }
}
